How I´m becoming a coding guy

Welcome to this journey, everybody is invited to explore and collaborate!

Git and Github - How did I share a website for free.

We are going to use Github to publish our website for free March 23, 2020

Hi there! I will be sharing with you the steps that I took to publish a website using Git and Github, I will also be sharing some Git useful commands.

You need a Github account and Git installed on your system... Let's start!


#1 Go to the project folder and start Git Bash:


#2 Execute git init:


#3 To check the status execute git status:


#4 To add all elements execute git add *:


#5 To check again the status execute git status this will show you the elements added (changes to be commited):


#6 To commit elements execute git commit -m "message":


#7 Create a new repository in your Github account:


#8 Set the repository name, description and create the repository:


#9 Save the repository "https" address


#10 To link the repository created with your local project folder execute git remote add origin https.....(after origin you must add the address copied in step #9 ):


#11 To synchronize your project execute git push origin master -f:


#12 Back to your Github repository, click Branch button, write gh-pages and click create branch button. This will create a new brach:


13 Click Settings button:


#14 Click Branches, select gh-pages and update:


#15 Click Options scroll down until Github Pages there you will have the link to share your website!:


#16 I had an issue due to Github needs an index.html to work and I had a home.index instead:


#17 I fixed this modifying my project, then I commit the changes with Modifying home.html to index.html as message:


#18 I tried again and bum! there you have your website ready to be shared: